<template>
	<view>
		<navbar title="会议搜索" :back="true" color="#fff" leftIconColor="#fff"/>

		<view  style="background-color: rgba(167, 167, 167,.2);border-radius: 26rpx;margin: 40rpx;">
			<u-search placeholder="输入会议关键词搜索" v-model="keyword" shape="round" :showAction="false" @search="search" bgColor='transparent' color='#000' placeholderColor='#000' searchIconColor='#000'>
			</u-search>
		</view>
		<view class="item">
			<view class="tj">
			    推荐类型
			</view>
			
			<view class="u-flex u-col u-col-center u-flex-wrap ">
				<view class="hot-text u-flex u-row-left" v-for="(item,index) in categoryList" :key="index" @tap="goDetail(item)">
					<view style="margin-left: 10rpx;">
						{{item.label}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import navbar from '@/components/baseNavbar.vue'
	import {
		getChildList
	} from "@/api/make.js"
	export default {
		components: {
			navbar
		},
		data() {
			return {
				keyword: '',
				categoryList: []
			}
		},
		onLoad(option) {
			this.getCategoryList()
		},
		methods: {
			getCategoryList() {
				getChildList().then(res=>{
				     this.categoryList = res.data.slice(0,6)
					 console.log('11',this.categoryList);
				  })
			},
			goDetail(item) {
				uni.navigateTo({
					url: "/pages/sub/store/screen?id=" + item.value
				})
			},
			search(value) {
				uni.navigateTo({
					url: "/pages/sub/store/screen?keyword=" + value
				})
			}
		}

	}
</script>
<style lang="scss">
	page{
		background-color:#f6f6f6;
		height: 100%;
	}
</style>

<style scoped lang="scss">
	.search {
		padding: 40rpx;
	}

	.tj {
		line-height: 100rpx;
		letter-spacing: 5rpx;
		font-size: 30rpx;
	}

	.hot-text {
		font-size: 28rpx;
		letter-spacing: 6rpx;
		height: 60rpx;
		line-height: 60rpx;
		margin-bottom: 20rpx;
		border: 1rpx solid #bcbcbc;
		padding: 0 20rpx;
		margin-right: 25rpx;
	}

	.item {
		padding: 0 30rpx;
	}
</style>
